package jsyf.oa.entity.system;

import com.alibaba.fastjson.JSONObject;
import jsyf.oa.ientity.BaseEntity;

import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * @author: 徐波
 * @creat: 2017/11/23 0023 10:17
 * description:
 */
@Entity
@Table(name = "T_SYS_COMPANY", schema = "oa", catalog = "")
public class CompanyEntity extends BaseEntity implements Serializable{
    private String name;
    private Integer sortNo;
    private String address;
    private String createUserId;
    private String parentId;
    private String updateUserId;
    private String allName;
    private String provincialCapital;
    private String taxId;
    private String fixedTelephone;
    private String availableBrands;
    private String brand;
    private String province;
    private String city;

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getAvailableBrands() {
        return availableBrands;
    }

    public void setAvailableBrands(String availableBrands) {
        this.availableBrands = availableBrands;
    }

    public String getAllName() {
        return allName;
    }

    public void setAllName(String allName) {
        this.allName = allName;
    }

    public String getProvincialCapital() {
        return provincialCapital;
    }

    public void setProvincialCapital(String provincialCapital) {
        this.provincialCapital = provincialCapital;
    }

    public String getTaxId() {
        return taxId;
    }

    public void setTaxId(String taxId) {
        this.taxId = taxId;
    }

    public String getFixedTelephone() {
        return fixedTelephone;
    }

    public void setFixedTelephone(String fixedTelephone) {
        this.fixedTelephone = fixedTelephone;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getSortNo() {
        return sortNo;
    }

    public void setSortNo(Integer sortNo) {
        this.sortNo = sortNo;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(String createUserId) {
        this.createUserId = createUserId;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getUpdateUserId() {
        return updateUserId;
    }

    public void setUpdateUserId(String updateUserId) {
        this.updateUserId = updateUserId;
    }

    @Override
    public JSONObject getJSONObject() {
        JSONObject json = new JSONObject();
        json.put("ID", this.getId());
        json.put("NAME", this.getName());
        json.put("SORT_NO", this.getSortNo());
        json.put("DEL_FLAG", this.getDelFlag());
        json.put("ADDRESS", this.getAddress());
        json.put("CREATE_TIME", this.getCreateTime());
        json.put("CREATE_USER_ID", this.getCreateUserId());
        json.put("PARENT_ID", this.getParentId());
        json.put("UPDATE_USER_ID", this.getUpdateUserId());
        json.put("UPDATE_TIME", this.getUpdateTime());
        json.put("ALL_NAME",this.getAllName());
        json.put("PROVINCIAL_CAPITAL",this.getProvincialCapital());
        json.put("TAX_ID",this.getTaxId());
        json.put("FIXED_TELEPHONE",this.getFixedTelephone());
        json.put("AVAILABLE_BRANDS", this.getAvailableBrands());
        json.put("BRAND", this.getBrand());
        json.put("PROVINCE", this.getProvince());
        json.put("CITY", this.getCity());
        return json;
    }

    @Override
    public String getTableName() {
        return "T_SYS_COMPANY";
    }

    @Override
    public JSONObject getJSONColumns() {
        JSONObject json = new JSONObject();
        json.put("ID", "id");
        json.put("NAME", "name");
        json.put("SORT_NO", "sortNo");
        json.put("DEL_FLAG", "delFlag");
        json.put("ADDRESS", "address");
        json.put("CREATE_TIME", "createTime");
        json.put("CREATE_USER_ID", "createUserId");
        json.put("PARENT_ID", "parentId");
        json.put("UPDATE_USER_ID", "updateUserId");
        json.put("UPDATE_TIME", "updateTime");
        json.put("ALL_NAME", "allName");
        json.put("PROVINCIAL_CAPITAL", "provincialCapital");
        json.put("TAX_ID", "taxId");
        json.put("FIXED_TELEPHONE", "fixedTelephone");
        json.put("AVAILABLE_BRANDS", "availableBrands");
        json.put("BRAND", "brand");
        json.put("PROVINCE", "province");
        json.put("CITY", "city");

        return json;
    }
}
